package com.njlime.cms.entities;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.njlime.core.base.entities.BaseEntityPlus;
import com.njlime.core.web.validation.RegexType;
import com.njlime.core.web.validation.annotation.Validate;

/**
 * 社区实体类
 *
 * @since 
 */
@Entity
@Table(name = "t_community")
public class Community extends BaseEntityPlus{
    @Validate(description = "社区类型", nullable = false,regexType= RegexType.NUMBER)
    private Integer community_type; // 社区类型 1图片 2对抗
    @Validate(description = "正文", nullable = false)
    private String content; // 正文
    @Validate(description = "标题", nullable = false)
    private String title; // 摘要
    @Validate(description = "位置", nullable = false,regexType= RegexType.NUMBER)
    private Integer position; // 位置
    @Validate(description = "标签", nullable = false,regexType= RegexType.NUMBER)
    private Integer label_id; // 标签 关联标签表
    @Validate(description = "频道", nullable = false,regexType= RegexType.NUMBER)
    private Integer channel_id; // 频道ID
    @Validate(description = "栏目", nullable = false,regexType= RegexType.NUMBER)
    private Integer column_id; // 栏目ID
    @Validate(description = "状态", nullable = false,regexType= RegexType.NUMBER)
    private Integer publish_status; // 1 草稿（预览） 2未发布 3已发布 4已下线
    private Date publish_time; // 发布时间  如果当前为定时发送的则为定时时间，如果当前为立刻发布则为发布时间
    private Integer reading; // 阅读量
    private Integer comment_num; // 评论数
    private Integer fabulous_num; //点赞数
    private Integer is_comment; // 评论审核开关
    @Validate(description = "是否奖励", nullable = false,regexType= RegexType.NUMBER)
    private Integer is_prize; // 是否奖励
    private String prize; //奖品
    private Integer unit_id; // 单位
    private Integer root_unit_id; // 根单位ID
    private String pic; // 图片1
    private String pk_pic1; // 图片2
    private String pk_pic2; // 图片3，对抗类型时没有
    private String pk_content1; // 对抗内容1
    private String pk_content2; // 对抗内容2

    /**
     * 社区类型
     * NORMAL 1 图文
     * PK 2 对抗
     */
    public static final class CommunityType{
        public static final int NORMAL = 1; // 图文
        public static final int PK = 2; //对抗
    }

    /**
     * 社区位置
     * OP = 1; 置顶
     * TOP_TWO = 2; 二条
     * TOP_THREE = 3; 三条
     * DEFAULT = 99; 默认
     */
    public static final class CommunityPosition {
        public static final int TOP = 1; //置顶
        public static final int TOP_TWO = 2; //二条
        public static final int TOP_THREE = 3; //三条
        public static final int DEFAULT = 99; //默认
    }

    public Integer getCommunity_type() {
        return community_type;
    }

    public void setCommunity_type(Integer community_type) {
        this.community_type = community_type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    public Integer getLabel_id() {
        return label_id;
    }

    public void setLabel_id(Integer label_id) {
        this.label_id = label_id;
    }

    public Integer getPublish_status() {
        return publish_status;
    }

    public void setPublish_status(Integer publish_status) {
        this.publish_status = publish_status;
    }

    public Date getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(Date publish_time) {
        this.publish_time = publish_time;
    }

    public Integer getReading() {
        return reading;
    }

    public void setReading(Integer reading) {
        this.reading = reading;
    }

    public Integer getComment_num() {
        return comment_num;
    }

    public void setComment_num(Integer comment_num) {
        this.comment_num = comment_num;
    }

    public Integer getUnit_id() {
        return unit_id;
    }

    public void setUnit_id(Integer unit_id) {
        this.unit_id = unit_id;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getPk_pic1() {
        return pk_pic1;
    }

    public void setPk_pic1(String pk_pic1) {
        this.pk_pic1 = pk_pic1;
    }

    public String getPk_pic2() {
        return pk_pic2;
    }

    public void setPk_pic2(String pk_pic2) {
        this.pk_pic2 = pk_pic2;
    }

    public String getPk_content1() {
        return pk_content1;
    }

    public void setPk_content1(String pk_content1) {
        this.pk_content1 = pk_content1;
    }

    public String getPk_content2() {
        return pk_content2;
    }

    public void setPk_content2(String pk_content2) {
        this.pk_content2 = pk_content2;
    }

    public Integer getIs_comment() {
        return is_comment;
    }

    public void setIs_comment(Integer is_comment) {
        this.is_comment = is_comment;
    }

    public Integer getChannel_id() {
        return channel_id;
    }

    public void setChannel_id(Integer channel_id) {
        this.channel_id = channel_id;
    }

    public Integer getColumn_id() {
        return column_id;
    }

    public void setColumn_id(Integer column_id) {
        this.column_id = column_id;
    }

    public Integer getIs_prize() {
        return is_prize;
    }

    public void setIs_prize(Integer is_prize) {
        this.is_prize = is_prize;
    }

    public String getPrize() {
        return prize;
    }

    public void setPrize(String prize) {
        this.prize = prize;
    }

    public Integer getRoot_unit_id() {
        return root_unit_id;
    }

    public void setRoot_unit_id(Integer root_unit_id) {
        this.root_unit_id = root_unit_id;
    }

    public Integer getFabulous_num() {
        return fabulous_num;
    }

    public void setFabulous_num(Integer fabulous_num) {
        this.fabulous_num = fabulous_num;
    }
}